package openase.audiosearch.client.resources;

import java.awt.Image;
import java.net.URL;

import javax.swing.Icon;
import javax.swing.ImageIcon;

public class Resources {

    private static final String IMG_MICROPHONE = "microphone.png";
    
    public static final URL MICROPHONE_URL = Resources.class.getResource(IMG_MICROPHONE);

    public static Icon getIcon(URL resourceName) {
        ImageIcon icon = new ImageIcon(resourceName);
        
        int imageW = 32;
        int imageH = 32;
        
        Image img = icon.getImage();  
        Image newimg = img.getScaledInstance(imageW, imageH,  java.awt.Image.SCALE_SMOOTH);  
        return new ImageIcon(newimg); 
        
    }
    
}
